<?php 
$j = 0;

$rows[0][$j]['label'] = ucfirst($txt->getWord('fulltime'));
if($adc->CurrentAd->getIsFullTime() > 0)
{ $rows[0][$j]['value'] = ucfirst($txt->getWord('yes')); }
else
{ $rows[0][$j]['value'] = ucfirst($txt->getWord('no')); }
$j++;


$rows[0][$j]['label'] = ucfirst($txt->getWord('employment_type'));
if($adc->CurrentAd->getEmploymentType() > 0)
{ $rows[0][$j]['value'] = ucfirst($txt->getWord('employment_type_'.$adc->CurrentAd->getEmploymentType())); }
else
{ $rows[0][$j]['value'] = ucfirst($txt->getWord('all')); }
$j++;

if($adc->CurrentAd->getCountryPart())
{
	$rows[0][$j]['label'] = ucfirst($txt->getWord('area'));
	$rows[0][$j]['value'] = $adc->CurrentAd->getCountryPartTitle();
	$j++;
}
if($adc->CurrentAd->getDiploma() > 0)
{
	$rows[0][$j]['label'] = ucfirst($txt->getWord('diploma_required'));
	$rows[0][$j]['value'] = ucfirst($txt->getWord('yes'));
	$j++;
}
if(($adc->CurrentAd->getDateStart() != '') && 
   ($adc->CurrentAd->getDateStart('Y-m-d') != '1970-01-01') &&
   ($adc->CurrentAd->getDateStart() != '0000-00-00'))
{
	$rows[1][$j]['label'] = ucfirst($txt->getWord('position_avaliable_from'));
	$rows[1][$j]['value'] = $adc->CurrentAd->getDateStart();
	$j++;
}
$date = strtotime($adc->CurrentAd->getDateDue());
if(($adc->CurrentAd->getDateDue() != '') && 
   ($adc->CurrentAd->getDateDue('Y-m-d') != '1970-01-01') &&
   ($adc->CurrentAd->getDateDue() != '0000-00-00'))
{
	$rows[1][$j]['label'] = ucfirst($txt->getWord('application_deadline'));
	if($date < date('now'))
	{ $rows[1][$j]['value'] = ucfirst($txt->getWord('as_soon_as_possible')); }
	else
	{ $rows[1][$j]['value'] = $adc->CurrentAd->getDateDue(); }
	$j++;
}

unset($j);
if($rows > 0)
{
	foreach(array_keys($rows) as $i)
	{
		if(count($rows[$i]) > 0)
		{
			$rows[$i]['table'] = '<table border="0" cellpadding="0" cellspacing="0">';
			foreach(array_keys($rows[$i]) as $j)
			{
				if(is_array($rows[$i][$j]))
				{
					if(is_int($rows[$i][$j]['value']))
					{ $rows[$i][$j]['value'] = number_format($rows[$i][$j]['value'], 0, ',', ' '); }
					
					$rows[$i]['table'] .= 	'<tr>';
					$rows[$i]['table'] .= 		'<td class="left '.$adc->getSetting('AttributeClass').'">'.$rows[$i][$j]['label'].'</td>';
					if($rows[$i][$j]['value'])
					{
						$rows[$i]['table'] .= 		'<td>&nbsp;:&nbsp;&nbsp;</td>';
						$rows[$i]['table'] .= 		'<td class="left '.$adc->getSetting('AttributeValClass').'">'.$rows[$i][$j]['value'].' '.$rows[$i][$j]['unit'].'</td>';
					}
					$rows[$i]['table'] .= 	'</tr>';
				}
			}
			$rows[$i]['table'] .= '</table>';
		}
	}
}
?>
<h3><?php echo ucfirst($txt->getWord('information')); ?></h3>
<table border="0" cellpadding="0" cellspacing="0">
    <tr>  
        <td class="top left"><?php  echo $rows[0]['table']; ?></td>
        <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
        <td class="top left"><?php  echo $rows[1]['table']; ?></td>
    </tr>
</table><div class="clear"></div><br />
<?php if($rows[2]): ?>
<h3><?php echo ucfirst($txt->getWord('equipment')); ?></h3>
<table border="0" cellpadding="0" cellspacing="0">
    <tr>  
        <td class="top left"><?php  echo $rows[2]['table']; ?></td>
        <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
        <td class="top left"><?php // echo $rows[1]['table']; ?></td>
    </tr>
</table><div class="clear"></div><br />
<?php endif; ?>
<?php 
//print_r($adc->CurrentAd);
?>
<div class="clear"></div>
<hr />